//
//  BaseViewController.m
//  CustomTabBar
//
//  Created by giantumbrella on 15/5/20.
//  Copyright (c) 2015年 zhaojuan. All rights reserved.
//

#import "BaseViewController.h"
#import "CommonMacro.h"

@interface BaseViewController ()
@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    //左侧按钮
    UIBarButtonItem *leftButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"_0001_购物车"] style:UIBarButtonItemStyleDone target:self action:@selector(backUpView)];
    self.navigationItem.leftBarButtonItem = leftButton;
    self.navigationItem.leftBarButtonItem.tintColor = [UIColor whiteColor];
    
       //右侧按钮
    UIBarButtonItem *rightButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"试用详情页分享"] style:UIBarButtonItemStylePlain target:self action:nil];
    self.navigationItem.rightBarButtonItem = rightButtonItem;
    self.navigationItem.rightBarButtonItem.tintColor = [UIColor whiteColor];
    
    //tabbar字体颜色
    [self.tabBarController.tabBar setSelectedImageTintColor:[UIColor redColor]];
    self.view.backgroundColor = [UIColor whiteColor];
    
    //tabbar左右按钮
//    self.navigationItem.leftBarButtonItem = nil;
//    self.navigationItem.rightBarButtonItem = nil;
    //设置导航栏背景颜色
    [self.navigationController.navigationBar setBarTintColor:UIColorWithRGBA(233, 56, 103, 1)];
    //设置导航栏字体颜色
    [self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],NSForegroundColorAttributeName,nil]];
}


#pragma mark 返回上一个界面
- (void)backUpView
{
    [self.navigationController dismissViewControllerAnimated:YES completion:nil];
}






- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}


@end
